Remove dead code from blkback.
authorakw27@arcadians.cl.cam.ac.uk <akw27@arcadians.cl.cam.ac.uk>
Sun, 21 Aug 2005 12:24:21 +0000 (12:24 +0000)
committerakw27@arcadians.cl.cam.ac.uk <akw27@arcadians.cl.cam.ac.uk>
Sun, 21 Aug 2005 12:24:21 +0000 (12:24 +0000)
Signed-off-by: Andrew Warfield <andrew.warfield@cl.cam.ac.uk>
linux-2.6-xen-sparse/drivers/xen/blkback/common.h
linux-2.6-xen-sparse/drivers/xen/blkback/interface.c

index ffb44a78d6797f03032d99b9b87ff066de2d1c81..dd56fdeb258a9809cc7d0d0f660f45e7838a2b8b 100644 (file)
@@ -53,7 +53,7 @@ typedef struct blkif_st {
     rb_root_t         vbd_rb;        /* Mapping from 16-bit vdevices to VBDs.*/
     spinlock_t        vbd_lock;      /* Protects VBD mapping. */
     /* Private fields. */
-    enum { DISCONNECTED, DISCONNECTING, CONNECTED } status;
+    enum { DISCONNECTED, CONNECTED } status;
     /*
      * DISCONNECT response is deferred until pending requests are ack'ed.
      * We therefore need to store the id from the original request.
index a29fe2d6eee7d78637448feb6f13442f999f28dc..259b65c39cb11bb5b0ebfddb8721e10151b48a33 100644 (file)
@@ -7,7 +7,6 @@
  */
 
 #include "common.h"
-#include <asm-xen/ctrl_if.h>
 #include <asm-xen/evtchn.h>
 
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
@@ -138,52 +137,6 @@ int blkif_map(blkif_t *blkif, unsigned long shared_page, unsigned int evtchn)
     return 0;
 }
 
-static void __blkif_disconnect_complete(void *arg)
-{
-    blkif_t              *blkif = (blkif_t *)arg;
-    ctrl_msg_t            cmsg;
-    blkif_be_disconnect_t disc;
-
-    /*
-     * These can't be done in blkif_disconnect() because at that point there
-     * may be outstanding requests at the disc whose asynchronous responses
-     * must still be notified to the remote driver.
-     */
-    unmap_frontend_page(blkif);
-    vfree(blkif->blk_ring.sring);
-
-    /* Construct the deferred response message. */
-    cmsg.type         = CMSG_BLKIF_BE;
-    cmsg.subtype      = CMSG_BLKIF_BE_DISCONNECT;
-    cmsg.id           = blkif->disconnect_rspid;
-    cmsg.length       = sizeof(blkif_be_disconnect_t);
-    disc.domid        = blkif->domid;
-    disc.blkif_handle = blkif->handle;
-    disc.status       = BLKIF_BE_STATUS_OKAY;
-    memcpy(cmsg.msg, &disc, sizeof(disc));
-
-    /*
-     * Make sure message is constructed /before/ status change, because
-     * after the status change the 'blkif' structure could be deallocated at
-     * any time. Also make sure we send the response /after/ status change,
-     * as otherwise a subsequent CONNECT request could spuriously fail if
-     * another CPU doesn't see the status change yet.
-     */
-    mb();
-    BUG_ON(blkif->status != DISCONNECTING);
-    blkif->status = DISCONNECTED;
-    mb();
-
-    /* Send the successful response. */
-    ctrl_if_send_response(&cmsg);
-}
-
-void blkif_disconnect_complete(blkif_t *blkif)
-{
-    INIT_WORK(&blkif->work, __blkif_disconnect_complete, (void *)blkif);
-    schedule_work(&blkif->work);
-}
-
 void free_blkif(blkif_t *blkif)
 {
     blkif_t     **pblkif;